"""
https://www.bilibili.com/video/BV1e34y1M7Ps/?buvid=XUF7931F1F27A60D17F7BB3EC919DEF156003&is_story_h5=false&mid=MeWtQzySTnxCES2s3%2BSAKg%3D%3D&p=1&plat_id=344&share_from=ugc&share_medium=android&share_plat=android&share_session_id=0aee9377-33ef-4365-a316-92d47c311a2d&share_source=QQ&share_tag=s_i&spmid=playlist.playlist-video-detail.0.0&timestamp=1704285918&unique_k=eOYso04&up_id=94779326&vd_source=a0a45a400de2047b04d48c44e065b9b9
"""

import os
import logging
from PyCmpltrtok.common import get_dir_name_ext

DIR, BASE, EXT = get_dir_name_ext(os.path.abspath(__file__))

# LOG_FORMAT = "%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s"
LOG_FORMAT = "%(asctime)s - %(pathname)s[line:%(lineno)d] - %(levelname)s: %(message)s"

if __name__ == '__main__':

    PATH = os.path.join(DIR, 'bilibili.tmp.log')

    # logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT)
    logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT, filename=PATH)

    logging.debug('调试日志')
    logging.info('消息日志')
    logging.warning('Warning log.')
    logging.error('Error log.')
    logging.critical('Critical log.')

    print('All over')
